/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.contract.entity;


import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 币对表
 *
 * @date 2022-08-16 21:08:40
 */
@Data
@TableName("ripple_contract_symbol")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "币对表")
public class ContractSymbol extends Model<ContractSymbol> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 主币id
	 */
	@ApiModelProperty(value = "主币id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long mainCurId;

	/**
	 * 主币名称
	 */
	@ApiModelProperty(value = "主币名称")
	private String mainCurName;

	/**
	 * 主币精度
	 */
	@ApiModelProperty(value = "主币精度")
	@JsonSerialize(using = ToStringSerializer.class)
	private Integer mainCurAccuracy;

	/**
	 * 外币id
	 */
	@ApiModelProperty(value = "外币id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long tokenCurId;

	/**
	 * 外币名称
	 */
	@ApiModelProperty(value = "外币名称")
	private String tokenCurName;

	/**
	 * 外币精度
	 */
	@ApiModelProperty(value = "外币精度")
	@JsonSerialize(using = ToStringSerializer.class)
	private Integer tokenCurAccuracy;

	/**
	 * 名称
	 */
	@ApiModelProperty(value = "名称")
	private String name;

	/**
	 * 最大杠杆倍数
	 */
	@ApiModelProperty(value = "最大杠杆倍数")
	private Integer multiple;

	/**
	 * 市价单手续费费率
	 */
	@ApiModelProperty(value = "市价单手续费费率")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal marketFeeRate;

	/**
	 * 限价单手续费费率
	 */
	@ApiModelProperty(value = "限价单手续费费率")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal limitFeeRate;

	/**
	 * 资金费率
	 */
	@ApiModelProperty(value = "资金费率")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal fundingRate;

	/**
	 * 最小下单数量
	 */
	@ApiModelProperty(value = "最小下单数量")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minOrderNum;

	/**
	 * 最小下单价格
	 */
	@ApiModelProperty(value = "最小下单价格")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minOrderPrice;

	/**
	 * 市价单单笔最大数量
	 */
	@ApiModelProperty(value = "市价单单笔最大数量")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal maxMarketOrderNum;

	/**
	 * 限价单单笔最大数量
	 */
	@ApiModelProperty(value = "限价单单笔最大数量")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal maxLimitOrderNum;

	/**
	 * 最大挂单数量
	 */
	@ApiModelProperty(value = "最大挂单数量")
	private Integer maxPendingOrderNum;

	/**
	 * 最大条件单挂单数量
	 */
	@ApiModelProperty(value = "最大条件单挂单数量")
	private Integer maxConditionPendingOrderNum;

	/**
	 * 最小价格波动单位
	 */
	@ApiModelProperty(value = "最小价格波动单位")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minPriceFloatUnit;

	/**
	 * 限价单价格上限比率
	 */
	@ApiModelProperty(value = "限价单价格上限比率")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal limitOrderPriceCapRatio;

	/**
	 * 限价单价格下限比率
	 */
	@ApiModelProperty(value = "限价单价格下限比率")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal limitOrderPriceFloorRatio;

	/**
	 * 是否是热点数据（0否、1是）
	 */
	@ApiModelProperty(value = "是否是热点数据（0否、1是）")
	private String isHot;

	/**
	 * 顺序号
	 */
	@ApiModelProperty(value = "顺序号")
	private Integer orderNo;

	/**
	 * 强平清算费率
	 */
	@ApiModelProperty(value = "强平清算费率")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal liquidateFeeRate;

	/**
	 * 强平提前量
	 */
	@ApiModelProperty(value = "强平提前量")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal liquidateAdvance;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long createBy;

	/**
	 * 修改时间
	 */
	@ApiModelProperty(value = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * 修改人
	 */
	@ApiModelProperty(value = "修改人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateBy;

	/**
	 * 状态(0停用 1正常)
	 */
	@ApiModelProperty(value = "状态(0停用 1正常)")
	private String status;

	/**
	 * 是否删除（null是、0否）
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "是否删除（null是、0否）")
	private String isDeleted;

	/**
	 * 资金费率上限
	 */
	@ApiModelProperty(value = "资金费率上限")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal maxCapitalRate;

	/**
	 * 资金费率下限
	 */
	@ApiModelProperty(value = "资金费率下限")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minCapitalRate;

	/**
	 * 币对logo地址
	 */
	@ApiModelProperty(value = "币对logo地址")
	private String logoImg;

	/**
	 * 张数
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@ApiModelProperty(value = "张数")
	private BigDecimal sheet;
}
